<template>
	<div>
		<h1 ref="my-h1" id="h">获取原生DOM</h1>
		<book-case ref="mm" />
	</div>
</template>

<script>
import BookCase from "./BookCase.vue";
export default {
	components: {
		BookCase,
	},
	data() {
		return {};
	},
	mounted() {
        // $refs 挂在DOM上就是DOM对象,挂在组件上就是vue实例
		console.log(document.querySelector('#h'));
		console.log(this.$refs['my-h1']);
        console.log(this.$refs['mm']);
	},
};
</script>

<style scoped>
</style>